package com.zyh.number;

import java.math.BigDecimal;

public class NumberDemo8 implements Handleable{
    @Override
    public String handleString(String num) {
        BigDecimal big1 = new BigDecimal(num);
        BigDecimal divide = big1.divide(new BigDecimal("1"), 0, BigDecimal.ROUND_DOWN);
        String s = divide.toString();
        return s;
    }
}
class Test{
    public static void main(String[] args) {
        /*
        随堂练习
         */
        NumberDemo8 numberDemo8 = new NumberDemo8();
        BigDecimal bigDecimal = new BigDecimal("23.23456789");
        String s1 = numberDemo8.handleString("23.23456789");
        System.out.println("s1 = " + s1);
    }
}
interface Handleable{
    String handleString(String num);
}
